<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" version="-//W3C//DTD XHTML 1.1//EN" xml:lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<%= stylesheet_link_tag "site" %>
		<%= stylesheet_link_tag "profile" %>
		<%= javascript_include_tag :defaults %>
		<title><%= @title %></title>
	</head>
	<body>
		<div id="whole_page">
			<div id="header">Rails Space</div>
			<div id="nav">
				<span style="float: right">
					<% if logged_in? -%>
						<%= nav_link "Hub", "user", "index" %>
						<%= nav_link "Logout", "user", "logout" %>
					<% else -%>
						<%= nav_link "Register", "user", "register" %>
						<%= nav_link "Login", "user", "login" %>
					<% end -%>
				</span>
				<%= nav_link "Home", "site", "index" %> |
				<%= nav_link "About us", "site", "about" %> |
				<%= nav_link "Help", "site", "help" %> | 
				<%= nav_link "Community", "community", "index" %>
			</div>
			<div id="content">
				<% if flash[:notice] -%>
					<div id="notice"><%= flash[:notice] %></div>
				<% end -%>
				<%= yield %>
				<br clear="all" />
			</div>
		</div>
		<% if ENV["RAILS_ENV"] == "development" -%>
			<div id="debug">
				<a href="#" title="show params info" onclick="Element.toggle('params_debug_info');return false;">params</a> | 
				<a href="#" title="show session info" onclick="Element.toggle('params_session_info');return false;">session</a> | 
				<a href="#" title="show env info" onclick="Element.toggle('env_debug_info');reutrn false;">env</a> |
				<a href="#" title="request debug info" onclick="Element.toggle('request_debug_info');return false;">request</a>
				<fieldset id="params_debug_info" class="debug_info" style="display:none;">
					<legend>params</legend>
					<%= debug(params) %>
				</fieldset>
				<fieldset id="params_session_info">
					<legend>session</legend>
					<%= debug(session) %>
				</fieldset>
				<fieldset id="env_debug_info" class="debug_info" style="display:none";>
					<legend>env</legend>
					<%= debug(request.env) %>
				</fieldset>
				<fieldset id="request_debug_info" class="debug_info" style="display:none;">
					<legend>request</legend>
					<%= debug(request) %>
				</fieldset>
			</div>
		<% end -%>
	</body>
</html>